package com.yq.cp.controller.yw;


import com.yq.cp.entity.common.ApiResult;
import com.yq.cp.entity.yw.YwGdxxCljl;
import com.yq.cp.entity.yw.YwGdxxNzjl;
import com.yq.cp.service.yw.YwGdxxNzjlService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 运维-工单-扭转记录 前端控制器
 * </p>
 *
 * @author zh
 * @since 2024-09-07
 */
@RestController
@RequestMapping("/yw-gdxx-nzjl")
public class YwGdxxNzjlController {

    @Resource
    YwGdxxNzjlService ywGdxxNzjlService;

    @ResponseBody
    @PostMapping("nz")
    public ApiResult nz(@RequestBody YwGdxxNzjl ywGdxxCljl) {
        ywGdxxNzjlService.nz(ywGdxxCljl);
        return ApiResult.ok();
    }
    @ResponseBody
    @PostMapping("qxnz")
    public ApiResult qxnz(@RequestBody YwGdxxNzjl ywGdxxCljl) {
        ywGdxxNzjlService.qxnz(ywGdxxCljl);
        return ApiResult.ok();
    }
    @ResponseBody
    @PostMapping("jsnz")
    public ApiResult jsnz(@RequestBody YwGdxxNzjl ywGdxxCljl) {
        ywGdxxNzjlService.jsnz(ywGdxxCljl);
        return ApiResult.ok();
    }

    @ResponseBody
    @PostMapping("all")
    public ApiResult all(@RequestBody YwGdxxNzjl ywGdxxCljl) {
        List<YwGdxxNzjl> all = ywGdxxNzjlService.all(ywGdxxCljl);
        return ApiResult.ok().data(all);
    }
}

